<div class="main clearfix">
	<div class="main_inner">
		<div class="category-content">
			<div class="category-list clearfix">
				<h2><?= $category->title ?></h2>
				<div class="breadcrumbs">
					<?= $this->load->view('widget/breadcrumb', $breadcrumbs); ?>
				</div>
				<?php if($category->child): ?>
					<ul class="cat_child">
						<?php foreach($category->child as $child_id):
							$child = $this->category_model->get($child_id); ?>
							<li><a href="<?= siteUrl('post/index/'.$child->id) ?>"><?= $child->title ?></a></li>
						<?php endforeach ?>
					</ul>
				<?php endif ?>
			</div>
			<div class="news">
				<div class="newsTop clearfix">
				<?php
					foreach($items as $k=>$itm):
						if($k) break;
						$link = siteUrl('post/detail/'.$itm->id.'-'.$itm->alias, $itm->category_id);
				?>
						<div class="big_news clearfix">
							<div class="postImage">
								<a href="<?= $link ?>"><img alt="<?= html_escape($itm->title) ?>" src="<?= thumb($itm->image, 348, 261) ?>" alt="<?= html_escape($itm->title) ?>" /></a>
							</div>
							<div class="postText">
								<h3><a href="<?= $link ?>"><?= $itm->title ?></a></a></h3>
								<div class="postDescription"><?= $itm->description ?></div>
							</div>
						</div>
				<?php
						unset($items[$k]);
					endforeach;
				?>
					<div class="newsItems clearfix">
						<?php
							foreach($items as $k=>$itm):
								if($k>4) break;
								$link = siteUrl('post/detail/'.$itm->id.'-'.$itm->alias, $itm->category_id);
						?>
								<div class="item">
									<div class="postImage">
										<a href="<?= $link ?>"><img alt="<?= html_escape($itm->title) ?>" src="<?= thumb($itm->image, 183, 137) ?>" alt="<?= html_escape($itm->title) ?>" /></a>
									</div>
									<div class="postText">
										<h3><a href="<?= $link ?>"><?= $itm->title ?></a></a></h3>
									</div>
								</div>
						<?php
								unset($items[$k]);
							endforeach;
						?>
					</div>
				</div><!-- newsTop -->
				<div class="newsMain clearfix">
					<div class="newsItems">
						<?php
							foreach($items as $k=>$itm):
								$link = siteUrl('post/detail/'.$itm->id.'-'.$itm->alias, $itm->category_id);
						?>
								<!-- chu-de -->
								<div class="item clearfix">
									<div class="postImage">
										<a href="<?= $link ?>"><img alt="<?= html_escape($itm->title) ?>" src="<?= thumb($itm->image, 290, 190) ?>" alt="<?= html_escape($itm->title) ?>" /></a>
									</div>
									<div class="postText">
										<div class="postTitle">
											<h3><a href="<?= $link ?>"><?= $itm->title ?></a></a></h3>
										</div>
										<div class="postDescription"><?= word_limiter($itm->description, 20) ?></div>
									</div>
								</div>
						<?php endforeach ?>
						&nbsp;
					</div>
					<div class="videos">
						<?php if($videos): ?>
							<h2><a href="{$baseurl}/video"><strong>Video</strong> nổi bật</a></h2>
							<div class="videoItems clearfix">
								<?php
									foreach($videos as $k=>$itm):
										$link = siteUrl('post/detail/'.$itm->id.'-'.$itm->alias, $itm->category_id);
								?>
									<div class="item">
											<div class="thumb">
												<a href="<?= $link ?>"><img src="http://img.youtube.com/vi/<?= $itm->link_youtube ?>/0.jpg" alt="<?= html_escape($itm->title) ?>" /></a>
												<a href="<?= $link ?>"><span class="play"></span></a>
											</div>
										<div class="details">
											<h3 class="title"><a href="<?= $link ?>"><?= $itm->title ?></a></h3>
										</div>
									</div>
								<?php endforeach ?>
							</div>
						<?php endif ?>
						<div class="qc qc_20">{get_ads id=20}</div>
					</div>
				</div>
			</div>
			
			<div class="partion clearfix">
				<?php echo $this->pagination->create_links(); ?>
			</div><!-- End partion !-->

			<div class="qc qc_19">{get_ads id=19}</div>
			<div class="clr"></div>

		</div><!-- End category-content !-->

	</div><!-- main_inner -->
	<div class="right">
		<?php $this->load->view('frontend/video_week'); ?>
		<p></p>
		<?php $this->load->view('frontend/sitebar'); ?>
	</div><!-- right -->
</div><!-- main -->
